#ifndef _MYCONTACTLISTENER_H_
#define _MYCONTACTLISTENER_H_
#include "Box2D/Box2D.h"
#include <vector>
#include <algorithm>

struct MyContact{
	b2Fixture *fixtureA;
	b2Fixture *fixtureB;
	bool operator == (const MyContact& other) const
	{
		return (fixtureA == other.fixtureA) && (fixtureB == other.fixtureB);
	}
};



class MyContactListener : public b2ContactListener
{
public:
	MyContactListener(void);
	~MyContactListener(void);

	std::vector<MyContact>_contacts;

	virtual void BeginContact(b2Contact* contact);
	virtual void EndContact(b2Contact* contact);
	virtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold);
	virtual void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse);


};


#endif